package bean;

public class medicine {
    int mid;
    String name;
    String code;
    String category;
    String specification;
    String producer;
    String price;
    String quantity;

    String efficacy;

    //注：上述SQL语句创建一个名为medicine的药品表，其中id字段为自增主键，
// name为药品名称，code为药品编码，category为药品分类，specification为药品规格，
// producer为药品产地，price为药品价格，quantity为库存数量。药品表中的每一行代表一个药品。
    //efficacy为药品功效




    public medicine(int mid, String name, String code, String category, String specification, String producer, String price, String quantity, String efficacy) {
        this.mid = mid;
        this.name = name;
        this.code = code;
        this.category = category;
        this.specification = specification;
        this.producer = producer;
        this.price = price;
        this.quantity = quantity;
        this.efficacy = efficacy;
    }

    public medicine() {

    }


    public int getMid() {
        return mid;
    }

    public void setMid(int mid) {
        this.mid = mid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getProducer() {
        return producer;
    }

    public void setProducer(String producer) {
        this.producer = producer;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getQuantity() {
        return quantity;
    }

    public void setQuantity(String quantity) {
        this.quantity = quantity;
    }

    public String getEfficacy() {
        return efficacy;
    }

    public void setEfficacy(String efficacy) {
        this.efficacy = efficacy;
    }

    @Override
    public String toString() {
        return "medicine{" +
                "mid=" + mid +
                ", name='" + name + '\'' +
                ", code='" + code + '\'' +
                ", category='" + category + '\'' +
                ", specification='" + specification + '\'' +
                ", producer='" + producer + '\'' +
                ", price='" + price + '\'' +
                ", quantity='" + quantity + '\'' +
                ", efficacy='" + efficacy + '\'' +
                '}';
    }
}

//    CREATE TABLE medicine (
//        mid INT AUTO_INCREMENT PRIMARY KEY,
//        name VARCHAR(50) NOT NULL,
//    code VARCHAR(50) NOT NULL,
//    category VARCHAR(50) NOT NULL,
//    specification VARCHAR(50) NOT NULL,
//    producer VARCHAR(50) NOT NULL,
//    price DECIMAL(10,2) NOT NULL,
//    quantity INT NOT NULL
//);